//
//  banlirenTableViewCell.swift
//  BusinessIOS
//
//  Created by Rain on 2019/1/7.
//  Copyright © 2019 XingJian Li. All rights reserved.
//

import UIKit

class banlirenTableViewCell: UITableViewCell {

    var banlirenButton:UIButton!
    
    var nameLabel:UILabel!

    
    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
        
    }
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.lauoutUI()
        
    }
    func lauoutUI(){
            banlirenButton = UIButton()
            //背景颜色
            banlirenButton.backgroundColor = UIColor.white
            banlirenButton.setImage(UIImage(named: "Addshenpiren"), for: .normal)
            self.contentView.addSubview(banlirenButton)
        
        nameLabel = UILabel()
        nameLabel.text = "haha"
          nameLabel.textAlignment = .center
        nameLabel.font = UIFont.systemFont(ofSize:8)//一般方法
        self.contentView.addSubview(nameLabel);
        
        self.layoutViews()
    }
    
    
    func layoutViews() {
        
        
        self.banlirenButton.snp.makeConstraints { (make) in
            make.top.equalTo(self.snp.top).offset(0)
            make.left.equalTo(self.snp.left).offset(10)
            make.width.equalTo(50)
            make.height.equalTo(50)
        }
        
        self.nameLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self.banlirenButton.snp.bottom).offset(0)
            make.left.equalTo(self.snp.left).offset(10)
            make.width.equalTo(50)
            make.height.equalTo(10)
        }
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
